
import 'package:json_annotation/json_annotation.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'request_cuxiao.g.dart';

@JsonSerializable(explicitToJson: true)
class RequestShoppingCartItemPromotionPlanIds{

  String? companyId;
  List<BeanShoppingCartRequestPromotionProductList>? productList;
  List<BeanShoppingCartRequestPromotionItems>? items;

  RequestShoppingCartItemPromotionPlanIds(
      {
        this.companyId,
        this.productList,
        this.items,
      });

  //添加固定格式
  factory RequestShoppingCartItemPromotionPlanIds.fromJson(Map<String, dynamic> json) => _$RequestShoppingCartItemPromotionPlanIdsFromJson(json);
  Map<String, dynamic> toJson() => _$RequestShoppingCartItemPromotionPlanIdsToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanShoppingCartRequestPromotionProductList{

  String? itemId;
  bool? isUsePlatformCoupon;
  String? shopCartId;
  String? itemName;
  bool? isAmountCode;
  String? specId;
  int? notProductPromotion;
  String? brandId;
  dynamic quantity;
  dynamic listUnitPrice;
  dynamic memberUnitPrice;
  String? seriesId;
  List<String>? itemTypeIds;

  BeanShoppingCartRequestPromotionProductList(
      {
        this.itemId,
        this.isUsePlatformCoupon,
        this.shopCartId,
        this.itemName,
        this.isAmountCode,
        this.specId,
        this.notProductPromotion,
        this.brandId,
        this.quantity,
        this.listUnitPrice,
        this.memberUnitPrice,
        this.seriesId,
        this.itemTypeIds,
      }
      );

  //添加固定格式
  factory BeanShoppingCartRequestPromotionProductList.fromJson(Map<String, dynamic> json) => _$BeanShoppingCartRequestPromotionProductListFromJson(json);
  Map<String, dynamic> toJson() => _$BeanShoppingCartRequestPromotionProductListToJson(this);

}

@JsonSerializable(explicitToJson: true)
class BeanShoppingCartRequestPromotionItems{

  String? itemId;
  bool? isUsePlatformCoupon;
  String? shopCartId;
  String? itemName;
  bool? isAmountCode;
  String? specId;
  int? notProductPromotion;
  String? brandId;
  dynamic quantity;
  dynamic listUnitPrice;
  dynamic memberUnitPrice;
  String? seriesId;
  List<String>? itemTypeIds;


  BeanShoppingCartRequestPromotionItems(
      {
        this.itemId,
        this.isUsePlatformCoupon,
        this.shopCartId,
        this.itemName,
        this.isAmountCode,
        this.specId,
        this.notProductPromotion,
        this.brandId,
        this.listUnitPrice,
        this.memberUnitPrice,
        this.seriesId,
        this.itemTypeIds,
      }
      );


  //添加固定格式
  factory BeanShoppingCartRequestPromotionItems.fromJson(Map<String, dynamic> json) => _$BeanShoppingCartRequestPromotionItemsFromJson(json);
  Map<String, dynamic> toJson() => _$BeanShoppingCartRequestPromotionItemsToJson(this);

}


@JsonSerializable(explicitToJson: true)
class RequestShoppingCartItemTimedPromotion{

  String? planId;

  RequestShoppingCartItemTimedPromotion(
      {
        this.planId,
      });

  //添加固定格式
  factory RequestShoppingCartItemTimedPromotion.fromJson(Map<String, dynamic> json) => _$RequestShoppingCartItemTimedPromotionFromJson(json);
  Map<String, dynamic> toJson() => _$RequestShoppingCartItemTimedPromotionToJson(this);

}
@JsonSerializable(explicitToJson: true)
class RequestOrderMutexPlans{

  String? planId;

  RequestOrderMutexPlans(
      {
        this.planId,
      });

  //添加固定格式
  factory RequestOrderMutexPlans.fromJson(Map<String, dynamic> json) => _$RequestOrderMutexPlansFromJson(json);
  Map<String, dynamic> toJson() => _$RequestOrderMutexPlansToJson(this);

}

@JsonSerializable(explicitToJson: true)
class RequestShoppingCartItemListPromotion{

  int pageIndex=0;
  int pageSize=0;
  String? bomId;

  RequestShoppingCartItemListPromotion(
      {
        this.pageIndex=0,
        this.pageSize=0,
        this.bomId,
      });


  //添加固定格式
  factory RequestShoppingCartItemListPromotion.fromJson(Map<String, dynamic> json) => _$RequestShoppingCartItemListPromotionFromJson(json);
  Map<String, dynamic> toJson() => _$RequestShoppingCartItemListPromotionToJson(this);

}
@JsonSerializable(explicitToJson: true)
class RequestOrderItemPromotion{

  List<String>? planIds;//整单促销planId
  //购物车商品,同第一步getShoppingCartItemsPromotionPlanIds查找购物车商品促销的json对象一样
  RequestShoppingCartItemPromotionPlanIds? shoppingCartItems;

  RequestOrderItemPromotion(
      {
        this.planIds,
        this.shoppingCartItems,
      });


  //添加固定格式
  factory RequestOrderItemPromotion.fromJson(Map<String, dynamic> json) => _$RequestOrderItemPromotionFromJson(json);
  Map<String, dynamic> toJson() => _$RequestOrderItemPromotionToJson(this);

}